#!/home/hadoop/python26/bin/python
import json
import sys
import mylib

for line in sys.stdin:
    r = None
    try:
        r = json.loads(line.strip())
    except:
        continue
    if r != None:
        key = str(r['id'])
        date = r['created_at']
        unix_date = mylib.Twitter.ConvertToUnix(str(date))
        r['date'] = unix_date
        value = json.dumps(r, sort_keys = False)
        print key + '\t' + value
